package com.ccb.sc.setting.controller;

import com.ccb.sc.common.bind.response.ResBody;
import com.ccb.sc.common.modules.setting.service.ISettingsService;
import com.ccb.sc.common.modules.setting.vo.SiteSettingsVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ken
 * @version 1.0
 * @date 2022-08-01 22:58
 */
@RestController
@RequestMapping("/app/about")
@Api(value = "关于我们", tags = "关于我们")
public class AboutController {

    @Autowired
    private ISettingsService settingsService;

    @GetMapping("/")
    @ApiOperation(value = "获取关于我们", response = SiteSettingsVo.class)
    public ResBody<?> about() {
        SiteSettingsVo settings = this.settingsService.getSettings(SiteSettingsVo.class);
        return ResBody.success(settings);
    }

}
